<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型：外边距应用实现居中对齐</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            border: 1px solid red;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div>

    </div>
</body>

</html>